package mystruts;

import com.opensymphony.xwork2.ActionSupport;


public class TestAction extends ActionSupport{
	public String execute() throws Exception
	{
		System.out.println("TestAction.execute....");
		this.LOG.info("username:"+this.getUsername());
		this.LOG.info("passwoed:"+this.getPassword());
		this.LOG.debug("test");
		System.out.println(this.getPassword());
		if(this.getPassword()==null && this.getUsername()==null)
		{
		this.setMes("Welcome");
		this.nexaPage="testlogin";
		}
		else if("tom".equals(this.getUsername()) && "1234".equals(this.getPassword()))
		{

		}
		else
		{
			this.setMes("Plz check id,pswd.");
			this.nexaPage="testlogin";
		}
		return nexaPage;
	}
	String nexaPage=SUCCESS;
	String mes;
	String username;
	String password;
	public String getMes() {
		return mes;
	}
	public void setMes(String mes) {
		this.mes = mes;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
}
